package com.hongshan.wallet.base

import android.databinding.ViewDataBinding
import android.support.v7.widget.RecyclerView
import me.goldze.mvvmhabit.base.BaseViewModel

/**
 * Copyright Qiandai Ltd.
 * Copyright (c) 2019
 * All rights reserved
 *
 * @project  : Wallet
 * @package  : com.example.wallet.base
 * @author   : zhangxx
 * @data     : 2019/3/21
 * @email    : qq957413212@hotmail.com
 */
class BaseViewHolder<T: BaseViewModel>(val binding: ViewDataBinding) : RecyclerView.ViewHolder(binding.root) {

    fun bind(brId: Int, obj: T) {
        binding.setVariable(brId, obj)
        binding.executePendingBindings()
    }
}